Quartiles

Mathematical Foundation

Quartiles are statistical measures that divide an ordered dataset into four equal parts, providing insights into the distribution and spread of data. They extend the concept of the median by identifying the boundaries that separate the lowest 25%, middle 50%, and highest 25% of the data. Quartiles are essential for understanding data distribution, detecting outliers, and creating box plots.

Quartile Definitions:
  • First Quartile (Q₁): 25th percentile - separates lowest 25% from upper 75%
  • Second Quartile (Q₂): 50th percentile - same as the median
  • Third Quartile (Q₃): 75th percentile - separates lowest 75% from upper 25%
Calculation Methods:
  • Position Formula: Q_k position = k(n+1)/4 where k = 1, 2, 3
  • Inclusive Method: Q₁ at position (n+1)/4, Q₃ at position 3(n+1)/4
  • Exclusive Method: Q₁ at position (n+3)/4, Q₃ at position (3n+1)/4

Interactive Quartiles Calculator

Data Visualization

8
Q₁
16
Q₂ (Median)
21
Q₃
13
IQR

Worked Example 1: Quartiles for Odd Number of Values

Find the quartiles of: 12, 7, 15, 9, 21, 18, 13

Solution:

Step 1: Sort the data: 7, 9, 12, 13, 15, 18, 21

Step 2: n = 7, positions: Q₁ at (7+1)/4 = 2nd position, Q₃ at 3(7+1)/4 = 6th position

Step 3: Q₁ = 9, Q₂ = 13, Q₃ = 18

Worked Example 2: Quartiles for Even Number of Values

Find the quartiles of: 4, 7, 2, 9, 5, 8, 10, 6

Solution:

Step 1: Sort the data: 2, 4, 5, 6, 7, 8, 9, 10

Step 2: n = 8, positions: Q₁ at (8+1)/4 = 2.25th → average of 2nd and 3rd, Q₃ at 3(8+1)/4 = 6.75th → average of 6th and 7th

Step 3: Q₁ = (4 + 5)/2 = 4.5, Q₂ = (6 + 7)/2 = 6.5, Q₃ = (8 + 9)/2 = 8.5

Worked Example 3: Interquartile Range (IQR)

For the data: 3, 7, 8, 12, 15, 18, 22, 25, find Q₁, Q₃, and IQR.

Solution:

Sorted: 3, 7, 8, 12, 15, 18, 22, 25

Q₁ = (7 + 8)/2 = 7.5, Q₃ = (18 + 22)/2 = 20

IQR = Q₃ - Q₁ = 20 - 7.5 = 12.5

Interquartile Range (IQR)

The IQR measures the spread of the middle 50% of the data:

IQR = Q₃ - Q₁

The IQR is used to detect outliers and is more robust than the range since it excludes extreme values.

Quartile Deviation

The quartile deviation (or semi-interquartile range) is half of the IQR:

Quartile Deviation = IQR / 2 = (Q₃ - Q₁) / 2

This measures the average spread around the median.

Box Plot Construction

Quartiles are used to construct box plots:

Practice Problems

Problem 1: Find the quartiles of: 5, 8, 12, 15, 18, 20, 22
Solution:
Sorted: 5, 8, 12, 15, 18, 20, 22
Q₁ position = (7+1)/4 = 2nd value = 8
Q₂ = 15
Q₃ position = 3(7+1)/4 = 6th value = 20
Problem 2: Find the quartiles of: 3, 7, 9, 12, 15, 18
Solution:
Sorted: 3, 7, 9, 12, 15, 18
Q₁ position = (6+1)/4 = 1.75th → average of 1st and 2nd = (3+7)/2 = 5
Q₂ = (9+12)/2 = 10.5
Q₃ position = 3(6+1)/4 = 5.25th → average of 5th and 6th = (15+18)/2 = 16.5
Problem 3: For the data: 2, 5, 7, 8, 10, 12, 15, 18, find IQR and quartile deviation.
Solution:
Sorted: 2, 5, 7, 8, 10, 12, 15, 18
Q₁ = (5+7)/2 = 6, Q₃ = (12+15)/2 = 13.5
IQR = 13.5 - 6 = 7.5
Quartile deviation = 7.5 / 2 = 3.75
Problem 4: The quartiles of a dataset are Q₁ = 25, Q₃ = 75. Find the IQR.
Solution:
IQR = Q₃ - Q₁ = 75 - 25 = 50
Problem 5: Find the quartiles of: 1, 3, 5, 7, 9, 11, 13, 15, 17
Solution:
Sorted: 1, 3, 5, 7, 9, 11, 13, 15, 17
Q₁ position = (9+1)/4 = 2.5th → average of 2nd and 3rd = (3+5)/2 = 4
Q₂ = 9
Q₃ position = 3(9+1)/4 = 7.5th → average of 7th and 8th = (13+15)/2 = 14

Key Takeaways